package com.yehongyu.mytools.basic.jdk5;

public class JDK5_005_Parameters {

	public static void main(String[] args) {
		System.out.println(calc(1, 2));
		System.out.println(calc(1, 2, 3));
	}
	
	private static int calc(int... values) {
		int result = 0;
		for (int value : values) {
			result += value;
		}
		return result;
	}
}
